#include <iostream>
#include <string>
#include "IntArray.h"

using namespace std;
int main(int argc, char **argv)
{
	IntArray* a = IntArray::NewInstance(10);
	IntArray* b = IntArray::NewInstance(5);

	IntArray& array = a->self();
	IntArray& brray = b->self();

	if (a && b)
	{
		for (int i = 0; i < array.length(); i++)
		{
			array[i] = i;
		}

		brray = array;
		cout << "array.length() = " << array.length() << endl;
		cout << "brray.length() = " << brray.length() << endl;

		for (int i = 0 ; i <brray.length(); i++)
		{
			cout << brray[i] << endl;
		}
	}
	
	delete a;
	delete b;

	return 0;
}